const Router = require("koa-router");
const router = new Router();
const { register, login, updatePsd } = require("../controller/user");
const {
  userValidator,
  verifyUser,
  cryptPsd,
  validatorUserIpt,
  verifyUserIpt,
  verifyToken,
} = require("../middleware/user.middleware");
router.post("/register", userValidator, verifyUser, cryptPsd, register);
router.post("/login", validatorUserIpt, verifyUserIpt, login);
router.patch("/updatepsd", verifyToken, updatePsd);
module.exports = router;
